package 二叉树;

public class BuildTree {
    public static TreeNode buildTree(){
        TreeNode a = new TreeNode('a');
        TreeNode b = new TreeNode('b');
        TreeNode c = new TreeNode('c');
        TreeNode d = new TreeNode('d');
        TreeNode e = new TreeNode('e');
        TreeNode f = new TreeNode('f');
        TreeNode g = new TreeNode('g');
        TreeNode h = new TreeNode('h');

        a.left = b;
        a.right = c;
        b.left = d;
        b.right = g;
        e.right = h;

        return a;
    }

}
